//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.restaurant.application.indexes.goodscouponlist.support;

import com.google.common.collect.Lists;
import com.nebutown.commonunits.dataface.definitions.TimeInterval;
import com.nebutown.generation.Convert;
import com.nebutown.generation.PickableBean;
import java.util.List;

public class GoodsCouponSearch implements PickableBean {
    public static final String FN_NAME = "name";
    public static final String FN_NUMBER = "number";
    public static final String FN_USEFUL = "useful";
    public static final String FN_STATE = "state";
    public static final String FN_FIRSTTIME = "firstTime";
    public static final String FN_FIRSTCUSTOMERID = "firstCustomerId";
    public static final String FN_FIRSTPHONE = "firstPhone";
    public static final String FN_USEDTIME = "usedTime";
    public static final String FN_USEDCUSTOMERID = "usedCustomerId";
    public static final String FN_USEDPHONE = "usedPhone";
    public static final String FN_PAGE = "page";
    public static final List<String> FIELD_NAMES = Lists.newArrayList(new String[]{"name", "number", "useful", "state", "firstTime", "firstCustomerId", "firstPhone", "usedTime", "usedCustomerId", "usedPhone", "page"});
    private String name;
    private String number;
    private String useful;
    private String state;
    private TimeInterval firstTime;
    private String firstCustomerId;
    private String firstPhone;
    private TimeInterval usedTime;
    private String usedCustomerId;
    private String usedPhone;
    private Long page;

    public GoodsCouponSearch(String name, String number, String useful, String state, TimeInterval firstTime, String firstCustomerId, String firstPhone, TimeInterval usedTime, String usedCustomerId, String usedPhone, Long page) {
        this.setName(name);
        this.setNumber(number);
        this.setUseful(useful);
        this.setState(state);
        this.setFirstTime(firstTime);
        this.setFirstCustomerId(firstCustomerId);
        this.setFirstPhone(firstPhone);
        this.setUsedTime(usedTime);
        this.setUsedCustomerId(usedCustomerId);
        this.setUsedPhone(usedPhone);
        this.setPage(page);
    }

    public GoodsCouponSearch() {
    }

    public GoodsCouponSearch duplicate() {
        GoodsCouponSearch result = new GoodsCouponSearch();
        result.name = this.name;
        result.number = this.number;
        result.useful = this.useful;
        result.state = this.state;
        result.firstTime = this.firstTime == null ? null : this.firstTime.duplicate();
        result.firstCustomerId = this.firstCustomerId;
        result.firstPhone = this.firstPhone;
        result.usedTime = this.usedTime == null ? null : this.usedTime.duplicate();
        result.usedCustomerId = this.usedCustomerId;
        result.usedPhone = this.usedPhone;
        result.page = this.page;
        return result;
    }

    public String toString() {
        return Convert.toJson(this);
    }

    public String getName() {
        return this.name;
    }

    public void setName(String value) {
        this.name = value;
    }

    public GoodsCouponSearch withName(String value) {
        this.setName(value);
        return this;
    }

    public GoodsCouponSearch withName(String value, String defaultValue) {
        this.setName(value == null ? defaultValue : value);
        return this;
    }

    public String getNumber() {
        return this.number;
    }

    public void setNumber(String value) {
        this.number = value;
    }

    public GoodsCouponSearch withNumber(String value) {
        this.setNumber(value);
        return this;
    }

    public GoodsCouponSearch withNumber(String value, String defaultValue) {
        this.setNumber(value == null ? defaultValue : value);
        return this;
    }

    public String getUseful() {
        return this.useful;
    }

    public void setUseful(String value) {
        this.useful = value;
    }

    public GoodsCouponSearch withUseful(String value) {
        this.setUseful(value);
        return this;
    }

    public GoodsCouponSearch withUseful(String value, String defaultValue) {
        this.setUseful(value == null ? defaultValue : value);
        return this;
    }

    public String getState() {
        return this.state;
    }

    public void setState(String value) {
        this.state = value;
    }

    public GoodsCouponSearch withState(String value) {
        this.setState(value);
        return this;
    }

    public GoodsCouponSearch withState(String value, String defaultValue) {
        this.setState(value == null ? defaultValue : value);
        return this;
    }

    public TimeInterval getFirstTime() {
        return this.firstTime;
    }

    public void setFirstTime(TimeInterval value) {
        this.firstTime = value;
    }

    public GoodsCouponSearch withFirstTime(TimeInterval value) {
        this.setFirstTime(value);
        return this;
    }

    public GoodsCouponSearch withFirstTime(TimeInterval value, TimeInterval defaultValue) {
        this.setFirstTime(value == null ? defaultValue : value);
        return this;
    }

    public String getFirstCustomerId() {
        return this.firstCustomerId;
    }

    public void setFirstCustomerId(String value) {
        this.firstCustomerId = value;
    }

    public GoodsCouponSearch withFirstCustomerId(String value) {
        this.setFirstCustomerId(value);
        return this;
    }

    public GoodsCouponSearch withFirstCustomerId(String value, String defaultValue) {
        this.setFirstCustomerId(value == null ? defaultValue : value);
        return this;
    }

    public String getFirstPhone() {
        return this.firstPhone;
    }

    public void setFirstPhone(String value) {
        this.firstPhone = value;
    }

    public GoodsCouponSearch withFirstPhone(String value) {
        this.setFirstPhone(value);
        return this;
    }

    public GoodsCouponSearch withFirstPhone(String value, String defaultValue) {
        this.setFirstPhone(value == null ? defaultValue : value);
        return this;
    }

    public TimeInterval getUsedTime() {
        return this.usedTime;
    }

    public void setUsedTime(TimeInterval value) {
        this.usedTime = value;
    }

    public GoodsCouponSearch withUsedTime(TimeInterval value) {
        this.setUsedTime(value);
        return this;
    }

    public GoodsCouponSearch withUsedTime(TimeInterval value, TimeInterval defaultValue) {
        this.setUsedTime(value == null ? defaultValue : value);
        return this;
    }

    public String getUsedCustomerId() {
        return this.usedCustomerId;
    }

    public void setUsedCustomerId(String value) {
        this.usedCustomerId = value;
    }

    public GoodsCouponSearch withUsedCustomerId(String value) {
        this.setUsedCustomerId(value);
        return this;
    }

    public GoodsCouponSearch withUsedCustomerId(String value, String defaultValue) {
        this.setUsedCustomerId(value == null ? defaultValue : value);
        return this;
    }

    public String getUsedPhone() {
        return this.usedPhone;
    }

    public void setUsedPhone(String value) {
        this.usedPhone = value;
    }

    public GoodsCouponSearch withUsedPhone(String value) {
        this.setUsedPhone(value);
        return this;
    }

    public GoodsCouponSearch withUsedPhone(String value, String defaultValue) {
        this.setUsedPhone(value == null ? defaultValue : value);
        return this;
    }

    public Long getPage() {
        return this.page;
    }

    public void setPage(Long value) {
        this.page = value;
    }

    public GoodsCouponSearch withPage(Long value) {
        this.setPage(value);
        return this;
    }

    public GoodsCouponSearch withPage(Long value, Long defaultValue) {
        this.setPage(value == null ? defaultValue : value);
        return this;
    }

    public Object getValueOf(String name) {
        byte var3 = -1;
        switch(name.hashCode()) {
            case -1439168202:
                if (name.equals("usedCustomerId")) {
                    var3 = 8;
                }
                break;
            case -1396827031:
                if (name.equals("firstCustomerId")) {
                    var3 = 5;
                }
                break;
            case -1034364087:
                if (name.equals("number")) {
                    var3 = 1;
                }
                break;
            case -836041066:
                if (name.equals("useful")) {
                    var3 = 2;
                }
                break;
            case -279409622:
                if (name.equals("usedTime")) {
                    var3 = 7;
                }
                break;
            case -175003490:
                if (name.equals("firstPhone")) {
                    var3 = 6;
                }
                break;
            case -75485263:
                if (name.equals("usedPhone")) {
                    var3 = 9;
                }
                break;
            case 3373707:
                if (name.equals("name")) {
                    var3 = 0;
                }
                break;
            case 3433103:
                if (name.equals("page")) {
                    var3 = 10;
                }
                break;
            case 109757585:
                if (name.equals("state")) {
                    var3 = 3;
                }
                break;
            case 133022109:
                if (name.equals("firstTime")) {
                    var3 = 4;
                }
        }

        switch(var3) {
            case 0:
                return this.getName();
            case 1:
                return this.getNumber();
            case 2:
                return this.getUseful();
            case 3:
                return this.getState();
            case 4:
                return this.getFirstTime();
            case 5:
                return this.getFirstCustomerId();
            case 6:
                return this.getFirstPhone();
            case 7:
                return this.getUsedTime();
            case 8:
                return this.getUsedCustomerId();
            case 9:
                return this.getUsedPhone();
            case 10:
                return this.getPage();
            default:
                return null;
        }
    }

    public void setValueOf(String name, Object value) {
        byte var4 = -1;
        switch(name.hashCode()) {
            case -1439168202:
                if (name.equals("usedCustomerId")) {
                    var4 = 8;
                }
                break;
            case -1396827031:
                if (name.equals("firstCustomerId")) {
                    var4 = 5;
                }
                break;
            case -1034364087:
                if (name.equals("number")) {
                    var4 = 1;
                }
                break;
            case -836041066:
                if (name.equals("useful")) {
                    var4 = 2;
                }
                break;
            case -279409622:
                if (name.equals("usedTime")) {
                    var4 = 7;
                }
                break;
            case -175003490:
                if (name.equals("firstPhone")) {
                    var4 = 6;
                }
                break;
            case -75485263:
                if (name.equals("usedPhone")) {
                    var4 = 9;
                }
                break;
            case 3373707:
                if (name.equals("name")) {
                    var4 = 0;
                }
                break;
            case 3433103:
                if (name.equals("page")) {
                    var4 = 10;
                }
                break;
            case 109757585:
                if (name.equals("state")) {
                    var4 = 3;
                }
                break;
            case 133022109:
                if (name.equals("firstTime")) {
                    var4 = 4;
                }
        }

        switch(var4) {
            case 0:
                this.setName((String)value);
                return;
            case 1:
                this.setNumber((String)value);
                return;
            case 2:
                this.setUseful((String)value);
                return;
            case 3:
                this.setState((String)value);
                return;
            case 4:
                this.setFirstTime((TimeInterval)value);
                return;
            case 5:
                this.setFirstCustomerId((String)value);
                return;
            case 6:
                this.setFirstPhone((String)value);
                return;
            case 7:
                this.setUsedTime((TimeInterval)value);
                return;
            case 8:
                this.setUsedCustomerId((String)value);
                return;
            case 9:
                this.setUsedPhone((String)value);
                return;
            case 10:
                this.setPage((Long)value);
                return;
            default:
        }
    }

    public boolean hasField(String name) {
        return FIELD_NAMES.contains(name);
    }

    public int hashCode() {
        return this.signature().hashCode();
    }

    public boolean equals(Object o) {
        return !(o instanceof GoodsCouponSearch) ? false : this.signature().equals(((GoodsCouponSearch)o).signature());
    }

    public String signature() {
        throw new RuntimeException("Bean GoodsCouponSearch has no signature defined, no hash code or equals possible.");
    }
}
